package x.trident.core.micro.api;

import cn.hutool.core.lang.Dict;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import x.trident.core.pojo.response.ResponseData;

/**
 * feign服务的接口，服务提供者和消费者都实现这个接口
 *
 * @author Seven
 * @date 2021/5/17 14:10
 */
@RequestMapping("/feignExample")
public interface FeignExampleApi {

    /**
     * 示例请求成功
     */
    @RequestMapping(value = "/success", method = RequestMethod.POST)
    ResponseData success(@RequestBody Dict dict);

    /**
     * 示例请求失败
     */
    @RequestMapping(value = "/error", method = RequestMethod.POST)
    ResponseData error(@RequestBody Dict dict);

}
